//
//  BackBtn.swift
//  旅航ios
//
//  Created by tulip on 2021/4/26.
//

import UIKit

class BackBtn: UIButton {

    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.setImage(UIImage(named: "back"), for: .normal)
        self.addTarget(self, action: #selector(goback), for: .touchUpInside)
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    @objc func goback(){
        let cvc=getCurrentVc()
        cvc.navigationController?.popViewController(animated: true)
    }
    
}
